package com.fortune.dto.in.cPriceMgt;

import com.fortune.common.paging.PagingDto;
import com.fortune.constants.enums.ProduceSearchType;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

public class CWholesalePriceDto extends PagingDto{
    @ApiModelProperty(example="搜索关键词")
    private String search;
    @NotBlank(message="厂商id不能为空")
    @ApiModelProperty(example="厂商id")
    private String companyId;
    @NotNull(message="厂商类型不能为空")
    @ApiModelProperty(example="厂商类型(M厂商/D经销商/ALL所有)")
    private ProduceSearchType companyType;
    @ApiModelProperty(example="排序依据(起始日期:startTime,截止日期:endTime,满数量:achieveNum,赠数量:giftNum,优惠名称:name,商品名称:productName,商品编号:producNumber,默认为startTime)",allowableValues = "startTime,endTime,achieveNum,giftNum,name,productName,producNumber")
    private String order;
    @Min(value = 0,message = "最小值为0")
    @Max(value = 1,message = "最大值为1")
    @ApiModelProperty(example="排序类型(0升序,1降序,默认为1)")
    private Integer type;

    public String getOrder() {
        return order;
    }

    public void setOrder(String order) {
        this.order = order;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getSearch() {
        return search;
    }

    public void setSearch(String search) {
        this.search = search;
    }

    public String getCompanyId() {
        return companyId;
    }

    public void setCompanyId(String companyId) {
        this.companyId = companyId;
    }

    public ProduceSearchType getCompanyType() {
        return companyType;
    }

    public void setCompanyType(ProduceSearchType companyType) {
        this.companyType = companyType;
    }

    @Override
    public String toString() {
        return "CWholesalePriceDto{" +
                "search='" + search + '\'' +
                ", companyId='" + companyId + '\'' +
                ", companyType='" + companyType + '\'' +
                '}';
    }
}
